package com.telsoft.business;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;

import com.telsoft.data.DAOHelper;
import java.sql.ResultSet;

public class DAOHelperBusiness {

    public static Connection getConnection() throws SQLException {
        DAOHelper db = new DAOHelper();
        return db.getConnection();
    }

    public static Statement getStatement(Connection conn) throws SQLException {
        DAOHelper db = new DAOHelper();
        return db.getStatement(conn);
    }

    public static PreparedStatement getPreparedStatement(Connection conn, String sql) throws SQLException {
        DAOHelper db = new DAOHelper();
        return db.getPreparedStatement(conn, sql);
    }

    public static void closeStatement(Statement stm) throws SQLException {
        DAOHelper db = new DAOHelper();
        db.closeStatement(stm);
    }

    public static void closePreparedStatement(PreparedStatement preStm) throws SQLException {
        DAOHelper db = new DAOHelper();
        db.closePreparedStatement(preStm);
    }

    public static void closeConnection(Connection conn) throws SQLException {
        DAOHelper db = new DAOHelper();
        db.closeConnection(conn);
    }

    public static void closeResultSet(ResultSet rs) throws SQLException {
        DAOHelper db = new DAOHelper();
        db.closeResultSet(rs);
    }
}
